<!--Javascript-->
<script type="text/javascript" src="<?php echo base_url().'assets/js/jquery.min.js';?>"></script>
<script type="text/javascript" src="<?php echo base_url().'assets/js/bootstrap.min.js';?>"></script>
<script type="text/javascript" src="<?php echo base_url().'assets/js/bootstrap-datepicker.js';?>"></script>

<!-- Add mousewheel plugin (this is optional) -->
<script type="text/javascript" src="<?php echo base_url(); ?>assets/lib/fancybox/lib/jquery.mousewheel-3.0.6.pack.js"></script>

<!-- Add fancyBox -->
<link rel="stylesheet" href="<?php echo base_url(); ?>assets/lib/fancybox/source/jquery.fancybox.css?v=2.1.4" type="text/css" media="screen" />
<script type="text/javascript" src="<?php echo base_url(); ?>assets/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.4"></script>

<!-- Optionally add helpers - button, thumbnail and/or media -->
<link rel="stylesheet" href="<?php echo base_url(); ?>assets/lib/fancybox/source/helpers/jquery.fancybox-buttons.css?v=1.0.5" type="text/css" media="screen" />
<script type="text/javascript" src="<?php echo base_url(); ?>assets/lib/fancybox/source/helpers/jquery.fancybox-buttons.js?v=1.0.5"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/lib/fancybox/source/helpers/jquery.fancybox-media.js?v=1.0.5"></script>

<!-- chosen -->
<script type="text/javascript" src="<?php echo base_url(); ?>assets/lib/chosen/chosen.jquery.min.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/lib/uploadify/jquery.uploadify.min.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/lib/fancybox/source/helpers/jquery.fancybox-thumbs.js?v=1.0.7"></script>





<script type="text/javascript">	
	var loader = "<img src='<?php echo base_url() ?>assets/img/ajax-loader.gif' >";
	var base_url = "<?php echo base_url() ?>";
	$(document).ready(function(){				
	
    $('#file_upload').uploadify({
		'buttonText'        : 'UPLOAD VIDEO',
		'checkExisting'     : '<?php echo base_url() ?>assets/lib/uploadify/check-exists.php',
		'fileSizeLimit'     : '100MB',
        'fileTypeDesc'      : 'Video Files',		
        'fileTypeExts'      : '*.flv; *.jpg; *.mp4; *.mpg; *.mpeg; *.wmv; *.FLV; *.MP4; *.MPG; *.MPEG; *.WMV;', 
        'swf'      : '<?php echo base_url() ?>assets/lib/uploadify/uploadify.swf',
        'uploader' : '<?php echo base_url() ?>profile/upload_video/2',
		'onSelect'          : function() { 
                                if(trim(txt_title.value)=="")
                                {
                                    alert("Please enter video name.");
                                    txt_title.focus();
                                    $('#file_upload').uploadify('cancel'); 
                                    return false;
                                }
                              },
        'onSelectError'     : function() { alert('The file returned an error and was not added to the queue.');},
        'onUploadStart'     : function() { $("#file_upload").uploadify('settings', 'formData', {'txt_title':  $('#txt_title').val()}); },
        'onUploadComplete'  : function() { document.location='' }
        // Put your options here
    });
});			
		
	
	
</script>